/**
 * 
 */
package com.nari.heatshare.service;

import java.io.File;
import java.util.List;
import java.util.Map;

import com.nari.coreframe.service.IGenericService;
import com.nari.heatshare.model.ITemperaturePoint;
import com.nari.platform.model.PageCond;
import com.nari.platform.model.ResponseMsg;
import com.nari.platform.model.ResultWithPageCond;

/**
 * 
 * @author Xiaopeng
 * @date 2014-3-11
 */
public interface ITemperaturePointService extends IGenericService<ITemperaturePoint, String> {

	/**
	 * 分页查询温度点列表
	 * @param seriousNum 温度点编号(可选)
	 * @param projectUID 所属项目(可选)
	 * @param communityUID 所属小区(可选)
	 * @param buildingUID 所属楼栋(可选)
	 * @param concentratorUID 所属集中器(可选)
	 * @param pageCond
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-3-11
	 */
	public ResultWithPageCond<ITemperaturePoint> queryTempPointPage(String seriousNum, 
			String projectUID, String communityUID, String buildingUID, String concentratorUID, 
			PageCond pageCond) throws Exception;
	
	/**
	 * 通过温度点列表查询与之关联的小区ID-小区名称映射表
	 * @param tempPointList
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-3-11
	 */
	public Map<String, String> queryReferCommunitysByTpList(List<ITemperaturePoint> tempPointList) 
			throws Exception;
	
	/**
	 * 通过温度点列表查询与之关联的楼栋ID-楼栋名称映射表
	 * @param tempPointList
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-3-11
	 */
	public Map<String, String> queryReferBuildingsByTpList(List<ITemperaturePoint> tempPointList) 
			throws Exception;
	
	/**
	 * 通过温度点列表查询与之关联的热用户ID-门牌号映射表
	 * @param tempPointList
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-3-11
	 */
	public Map<String, String> queryReferRoomsByTpList(List<ITemperaturePoint> tempPointList) 
			throws Exception;
	
	/**
	 * 新增或修改温度点信息
	 * 说明：同一集中器下温度点编号不可以重复
	 * @param temperaturePoint
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-3-12
	 */
	public ResponseMsg saveOrUpdateTempPoint(ITemperaturePoint temperaturePoint) throws Exception;
	
	/**
	 * 温度点信息资料批量上传
	 * @param excelFile
	 * @param excelFileName
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-3-13
	 */
	public ResponseMsg saveOrUpdateTempPointBatch(File excelFile, 
			String excelFileName) throws Exception;
	
	/**
	 * 通过温度点所属关系统计温度点的个数
	 * @param projectUID
	 * @param communityUID
	 * @param buildingUID
	 * @param concentratorID
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-3-17
	 */
	public int countTempPointSumByBelongs(String projectUID, String communityUID, 
			String buildingUID, String concentratorUID) throws Exception;
	
	/**
	 * 通过集中器所属的温度点编号查询温度点信息
	 * 说明：原则上，同一集中器下温度点编号唯一
	 * @param concentratorNo
	 * @param seriousNum
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-3-13
	 */
	public ITemperaturePoint queryTempPointBySeriousNum(String concentratorNo, 
			String seriousNum) throws Exception;
	
	/**
	 * 通过集中器唯一标识查询对应的温度点列表
	 * @param concentratorUID
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-3-17
	 */
	public List<ITemperaturePoint> queryTempPointsByConcentratorUID(String concentratorUID) throws Exception;
	
	/**
	 * 通过温度点所属关系查询(所属项目、所属小区、所属楼栋、集中器)查询温度点列表
	 * @param projectUID 所属项目(可选)
	 * @param communityUID 所属小区(可选)
	 * @param buildingUID 所属楼栋(可选)
	 * @param concentratorUID 所属集中器(可选)
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-3-25
	 */
	public List<ITemperaturePoint> queryTempPointListByBelongs(String projectUID, 
			String communityUID, String buildingUID, String concentratorUID) throws Exception;
}
